<?php

/**
 * Acao form.
 *
 * @package    form
 * @subpackage Acao
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class LoginForm extends sfForm
{
  public function configure()
  {
    $this->setWidgets(array(
      'email'   => new sfWidgetFormInput(array(), array('style' => 'width: 235px', 'class' => 'campoobrigatorio')),
      'senha'   => new sfWidgetFormInputPassword(array(), array('class' => 'campoobrigatorio')),
    ));

    $this->setValidators(array(
      'senha'   => new sfValidatorString(array('required' => true)),
      'email'   => new sfValidatorEmail(),
    ));
	
	$this->widgetSchema->setLabels(array(
	  'email' => 'E-mail',
	));
	
	$this->validatorSchema['senha']->setMessage('required', 'Senha obrigatória');
	$this->validatorSchema['email']->setMessage('required', 'Informe seu e-mail');
	$this->validatorSchema['email']->setMessage('invalid', 'Informe um e-mail válido');
	
    $this->widgetSchema->setNameFormat('login[%s]');

  }
  
}